import React from "react";
import "../../css/zh/qrt.css";
import Cg from "../../css/zh/icon/cg.svg?react";
import store from "../../redux";
import axios from "axios";
import { useNavigate } from "react-router-dom";
export default function Qrt() {
     const navigate = useNavigate();
  const adds = () => {
    axios
      .post("http://localhost:3000/zadd", store.getState())
      .then((res, req) => {
        console.log(res.data);
        navigate('/login')
      });
    console.log(store.getState());
  };
  return (
    <div className="Qrt">
      <div className="Qrt_title">
        <Cg className="icon_cg"></Cg>
        <h1 style={{ color: "#7210ff" }}>恭喜你！</h1>
        <p>你的信息填写完成</p>
        <button
          onClick={() => {
            adds();
          }}
        >
          立即添加
        </button>
      </div>
    </div>
  );
}
